package com.ruoyi.web.controller.teaching;


import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.teaching.domain.PlatformFForumUser;
import com.ruoyi.teaching.service.PlatformFForumUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 王旭
 * @since 2025-02-17
 */
@RestController
@RequestMapping("/platform/forumUser")
@Api(tags = "platform-论坛用户管理")
public class PlatformFForumUserController {
    @Autowired
    private PlatformFForumUserService platformFForumUserService;

    /**
     * 分页获取用户信息
     */
    @GetMapping("/getAllList")
    @ApiOperation(value = "分页获取用户信息", notes = "分页获取用户信息")
    public AjaxResult getAllList(Integer pageNum, Integer pageSize, String nickName, String userName, Integer forumStatus){
        return platformFForumUserService.getAllList(pageNum, pageSize, nickName, userName, forumStatus);
    }

    /**
     * 批量修改状态
     */
    @PutMapping("/batchUpdateStatus")
    @ApiOperation(value = "批量修改状态", notes = "批量修改状态")
    public AjaxResult batchUpdateStatus(@RequestBody List<PlatformFForumUser> forumUsers){
        return platformFForumUserService.batchUpdateStatus(forumUsers);
    }

}

